bitkeeper revision 1.1159.1.396 (4190b0993dyih2jcsaNFCf8mqgG-bw)
authorcl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>
Tue, 9 Nov 2004 11:57:13 +0000 (11:57 +0000)
committercl349@freefall.cl.cam.ac.uk <cl349@freefall.cl.cam.ac.uk>
Tue, 9 Nov 2004 11:57:13 +0000 (11:57 +0000)
Pass domain to update_dom_time instead of shared_info.

xen/arch/x86/domain.c
xen/arch/x86/time.c
xen/common/domain.c
xen/common/schedule.c
xen/include/xen/time.h

index e95fc73be2a7841ad862105a59abd3c1e4299b03..331a1bd4ce680b08f7154337b767427f92e4e335 100644 (file)
@@ -828,7 +828,7 @@ int construct_dom0(struct domain *p,
     }
 
     /* Set up shared-info area. */
-    update_dom_time(p->shared_info);
+    update_dom_time(p);
     p->shared_info->domain_time = 0;
     /* Mask all upcalls... */
     for ( i = 0; i < MAX_VIRT_CPUS; i++ )
index 06eed7c4404730304dc0338d886f3c20f6734ee5..7ee85cc22a15b9d479f2ddc477685ce0af2f4546 100644 (file)
@@ -274,8 +274,9 @@ s_time_t get_s_time(void)
 }
 
 
-void update_dom_time(shared_info_t *si)
+void update_dom_time(struct domain *d)
 {
+    shared_info_t *si = d->shared_info;
     unsigned long flags;
 
     read_lock_irqsave(&time_lock, flags);
@@ -318,7 +319,7 @@ void do_settime(unsigned long secs, unsigned long usecs, u64 system_time_base)
 
     write_unlock_irq(&time_lock);
 
-    update_dom_time(current->domain->shared_info);
+    update_dom_time(current->domain);
 }
 
 
index 102afeff64e04f4a351f4475b5a4847b0fb10002..28eb98bedd12d70c698a16eef57fda80d25c2f8f 100644 (file)
@@ -278,7 +278,7 @@ int final_setup_guestos(struct domain *p, dom0_builddomain_t *builddomain)
         goto out;
 
     /* Set up the shared info structure. */
-    update_dom_time(p->shared_info);
+    update_dom_time(p);
 
     set_bit(DF_CONSTRUCTED, &p->d_flags);
 
index 22b97b6ef8010f79ad1d7121c66258e3fbc64776..96476a6ce42c607f5750ffee8a18e4f1af1c14af 100644 (file)
@@ -390,7 +390,7 @@ void __enter_scheduler(void)
 
     /* Ensure that the domain has an up-to-date time base. */
     if ( !is_idle_task(next->domain) )
-        update_dom_time(next->domain->shared_info);
+        update_dom_time(next->domain);
 
     if ( unlikely(prev == next) )
         return;
@@ -468,7 +468,7 @@ static void t_timer_fn(unsigned long unused)
     TRACE_0D(TRC_SCHED_T_TIMER_FN);
 
     if ( !is_idle_task(p->domain) ) {
-        update_dom_time(p->domain->shared_info);
+        update_dom_time(p->domain);
         send_guest_virq(p, VIRQ_TIMER);
     }
 
@@ -482,7 +482,7 @@ static void dom_timer_fn(unsigned long data)
     struct domain *p = (struct domain *)data;
     struct exec_domain *ed = p->exec_domain[0];
     TRACE_0D(TRC_SCHED_DOM_TIMER_FN);
-    update_dom_time(p->shared_info);
+    update_dom_time(p);
     send_guest_virq(ed, VIRQ_TIMER);
 }
 
@@ -496,7 +496,7 @@ static void fallback_timer_fn(unsigned long unused)
     TRACE_0D(TRC_SCHED_FALLBACK_TIMER_FN);
 
     if ( !is_idle_task(p) )
-        update_dom_time(p->shared_info);
+        update_dom_time(p);
 
     fallback_timer[ed->processor].expires = NOW() + MILLISECS(500);
     add_ac_timer(&fallback_timer[ed->processor]);
index dd476f9298c1a45d09d0ddc294b94465ccf24bf5..3c6d57a87b2593bb2686ad5661bced98bfbf2126 100644 (file)
@@ -34,6 +34,8 @@ extern int init_xen_time();
 
 extern unsigned long cpu_khz;
 
+struct domain;
+
 /*
  * System Time
  * 64 bit value containing the nanoseconds elapsed since boot time.
@@ -52,7 +54,7 @@ s_time_t get_s_time(void);
 #define MILLISECS(_ms)  (((s_time_t)(_ms)) * 1000000ULL )
 #define MICROSECS(_us)  (((s_time_t)(_us)) * 1000ULL )
 
-extern void update_dom_time(shared_info_t *si);
+extern void update_dom_time(struct domain *d);
 extern void do_settime(unsigned long secs, unsigned long usecs, 
                        u64 system_time_base);